package cn.com.bluemoon.daps.system.vo;

import cn.com.bluemoon.daps.common.enums.DatabaseType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author Jarod.Kong
 */
@Data
public class SysDatasourceVo {
    private String id;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "最后更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 非必填，存在文件系统的数据类型为空
     */
    @ApiModelProperty(value = "数据库类型, 1:mysql 2:pgsql 3:hive ...")
    private DatabaseType databaseType;

    @ApiModelProperty(value = "备注")
    private String description;

    @ApiModelProperty(value = "数据源名称")
    private String name;

    @ApiModelProperty(value = "系统信息id")
    private String systemInfoId;

    @ApiModelProperty(value = "系统名称")
    private String systemInfoName;

    @ApiModelProperty(value = "源类型,0 数据库 1 文件系统")
    private Integer type;

    @ApiModelProperty(value = "数据源用途,0:存储业务数据、1:采集元数据")
    private Integer usable;

    /**
     * 连接信息
     */
    private String dataSourceConnInfo;
    /**
     * 数据源连接信息
     */
    private List<SysDataSourceConnInfo> connInfos;


}
